﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;

namespace PlaceOrder_Core.PlaceOrderModels;

[Table("user_trade_bondhelper")]
public partial class UserTradeBondhelper
{
    [Column("id")]
    public long Id { get; set; }

    [Column("tscode")]
    public string Tscode { get; set; } = null!;

    [Column("user_trade_id")]
    public long UserTradeId { get; set; }

    [Column("price")]
    public decimal Price { get; set; }

    [Column("volume")]
    public int Volume { get; set; }

    [Column("broker")]
    public string Broker { get; set; } = null!;

    [Column("chatid")]
    public string Chatid { get; set; } = null!;

    [Column("userid")]
    public int Userid { get; set; }

    [Column("status")]
    public short Status { get; set; }


    [Column("deliverydate")]
    public DateOnly Deliverydate { get; set; }

    [Column("time")]
    public DateTime Time { get; set; }


    [Column("dealtype")]
    public string Dealtype { get; set; } = null!;

    [Column("receiver_id")]
    public int? ReceiverId { get; set; }

    [Column("command")]
    public string? Command { get; set; }

    [Column("order_type")]
    public short? OrderType { get; set; }

    [Column("guid")]
    public Guid? Guid { get; set; }

    [Column("daily_id")]
    public short? DailyId { get; set; }

    [Column("rest_volume")]
    public string? RestVolume { get; set; }

    [Column("broker_id")]
    public short? BrokerId { get; set; }

    // 其他属性

    public ICollection<ReviewMessage> ReviewMessages { get; set; }

    public override string ToString()
    {
        return $"Id: {Id}, " +
               $"Tscode: {Tscode}, " +
               $"UserTradeId: {UserTradeId}, " +
               $"Price: {Price}, " +
               $"Volume: {Volume}, " +
               $"Broker: {Broker}, " +
               $"Chatid: {Chatid}, " +
               $"Userid: {Userid}, " +
               $"Status: {Status}, " +
               $"Deliverydate: {Deliverydate}, " +
               $"Time: {Time}, " +
               $"Dealtype: {Dealtype}, " +
               $"ReceiverId: {ReceiverId}, " +
               $"Command: {Command}, " +
               $"OrderType: {OrderType}, " +
               $"Guid: {Guid}, " +
               $"DailyId: {DailyId}, " +
               $"RestVolume: {RestVolume}, " +
               $"BrokerId: {BrokerId}";
    }

}
